﻿<UserControl x:Class="Unscrambler.Views.RestartGamePrompt"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:localViews="clr-namespace:Unscrambler.Views"
             mc:Ignorable="d" 
             Height="600" Width="900">
    <UserControl.Resources>
        <Style TargetType="{x:Type TextBlock}">
            <Setter Property="FontSize" Value="20"/>
            <Setter Property="HorizontalAlignment" Value="Center"/>
        </Style>
        <Style TargetType="{x:Type localViews:RestartGamePrompt}">
            <Style.Triggers>
                <DataTrigger Binding="{Binding Path=AskIfUserWantsToRestartCurrentGame}" Value="True">
                    <Setter Property="Visibility" Value="Visible"/>
                </DataTrigger>
                <DataTrigger Binding="{Binding Path=AskIfUserWantsToRestartCurrentGame}" Value="False">
                    <Setter Property="Visibility" Value="Collapsed"/>
                </DataTrigger>
                <DataTrigger Binding="{Binding Path=AskIfUserWantsToExitCurrentGame}" Value="True">
                    <Setter Property="Visibility" Value="Collapsed"/>
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </UserControl.Resources>
    <StackPanel Margin="0,200,0,0">
        <StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center">
            <TextBlock Text="A game is in progress. If you start a new game this game will be lost. Are you sure?"
                   TextWrapping="Wrap"       >
                
            </TextBlock>
        </StackPanel>
        <StackPanel VerticalAlignment="Center" Orientation="Horizontal" Margin="0,20,0,0" HorizontalAlignment="Center" >
            <Button Content="Yes" Width="150" Height="80" Margin="0,0,10,0"
                        Command="{Binding Path=StartGameCommand}"/>
            <Button Content="No" Width="150" Height="80" Margin="10,0,0,0"
                        Command="{Binding Path=CancelStartGameCommand}"/>
        </StackPanel>
       
                        
        </StackPanel>
    
</UserControl>
